<div id="settingsdiv" class="center">
           
    <table border="0" class="center">
      <tr>
      	<td colspan="5">扫描相关</td>
      </tr>
      
      <tr>  
      	<td width="100px"></td>
        <td class="right">图片存在时是否重新下载</td>
        <td><input id="downloadevenexist" type="text" oldvalue="$downloadevenexist" value="$downloadevenexist" placeholder="Inactive" style="width:40px"></td>
        <td class="right">下载线程数</td>
        <td><input id="scanthread" type="text" oldvalue="$scanthread" value="$scanthread" placeholder="Inactive" style="width:40px"></td> 
      </tr>
      
      <tr>  
      	<td width="100px"></td>
        <td class="right">起始访问列表页</td>
        <td><input id="listpagestartindex" type="text" oldvalue="$listpagestartindex" value="$listpagestartindex" placeholder="Inactive" style="width:40px"></td>
        <td class="right">终止访问列表页</td>
        <td><input id="listpagestopindex" type="text" oldvalue="$listpagestopindex" value="$listpagestopindex" placeholder="Inactive" style="width:40px"></td>   
      </tr>
      
      
      
      <tr>
      	<td colspan="5">查看相关</td>
      </tr>
      <tr>  
      	<td width="100px"></td>
        <td class="right">图片列数</td>
        <td><input id="col" type="text" oldvalue="$col" value="$col" placeholder="Inactive" style="width:40px"></td>
        <td class="right">图片上限</td>
        <td><input id="limit" type="text" oldvalue="$limit" value="$limit" placeholder="Inactive" style="width:40px"></td>   
      </tr>
     
      
      <tr> 
     	<td width="100px"></td>
     	<td class="right">最后访问论坛</td>
        <td><input id="lastvisitforum" type="text" oldvalue="$lastvisitforum" value="$lastvisitforum" placeholder="Inactive" style="width:120px"></td>
        <td class="right">最后访问论坛组</td>
        <td><input id="lastvisitforumgroup" type="text" oldvalue="$lastvisitforumgroup" value="$lastvisitforumgroup" placeholder="Inactive" style="width:120px"></td>
      </tr>
      
      
      
      
      
      
      <tr>
      	<td colspan="5">调试选项</td>
      </tr>
      <tr>  
      	<td width="100px"></td>
        <td class="right">trstartindex</td>
        <td><input id="trstartindex" type="text" oldvalue="$trstartindex" value="$trstartindex" placeholder="Inactive" style="width:40px"></td>
        <td class="right">trstopindex</td>
        <td><input id="trstopindex" type="text" oldvalue="$trstopindex" value="$trstopindex" placeholder="Inactive" style="width:40px"></td>   
      </tr>
      
      <tr>  
      	<td width="100px"></td>
        <td class="right">trnum</td>
        <td><input id="trnum" type="text" oldvalue="$trnum" value="$trnum" placeholder="Inactive" style="width:40px"></td>
        <td class="right">droptable</td>
        <td><input id="droptable" type="text" oldvalue="$droptable" value="$droptable" placeholder="Inactive" style="width:40px"></td>
      </tr>
      
      <tr>  
      	<td width="100px"></td>
        <td class="right">是否加载post content</td>
        <td><input id="skiploadpost" type="text" oldvalue="$skiploadpost" value="$skiploadpost" placeholder="Inactive" style="width:40px"></td>
        <td class="right">是否假装下载图片</td>
        <td><input id="fackdownload" type="text" oldvalue="$fackdownload" value="$fackdownload" placeholder="Inactive" style="width:40px"></td>   
      </tr>
      
      <tr>  
      	<td width="100px"></td>
        <td class="right">nostoredb</td>
        <td><input id="nostoredb" type="text" oldvalue="$nostoredb" value="$nostoredb" placeholder="Inactive" style="width:40px"></td>
         <td class="right">toggleandremovepost</td>
        <td><input id="toggleandremovepost" type="text" oldvalue="$toggleandremovepost" value="$toggleandremovepost" placeholder="Inactive" style="width:40px"></td>
      </tr>      
      
  
      <tr>  
      	<td width="100px"></td>
        <td class="right">turnofflog</td>
        <td><input id="turnofflog" type="text" oldvalue="$turnofflog" value="$turnofflog" placeholder="Inactive" style="width:40px"></td>

      </tr>       
      
      
      
      
      
      
      <tr>
        <td colspan="5" align="center"><a class="btn btn-primary" id="settingokbtn">确定</a></td>   
      </tr>
    </table>
</div>


<script language="javascript">
$(function(){

	$("#settingbtn,#settingokbtn").click(function(){
		//setTimeout("slidetoggle('settingsdiv')",1000);
		elementid = "settingsdiv";
		$("#"+elementid).slideToggle(500);
		
		//setTimeout("$('#"+elementid+"').slideToggle(4000)",1000);
		//setTimeout("$('#"+elementid+"').remove()",5000);
			
	});
	
	$("#settingsdiv input").blur(function(){
		id = $(this).attr("id");
		newvalue = $(this).val();
		oldvalue = $(this).attr("oldvalue");
		
		if(oldvalue != newvalue){
			$(this).attr("oldvalue",newvalue);
			console.log(id + ":" + name + ":" +  oldvalue + "->" + newvalue);
			
			$.post('/hezi/setting?action=update',{id: id, 
								newvalue:newvalue,
								},function(theback)
			  {
				console.log("back:" + theback);
				}
			);
			
		}
		
	});
	
})

function slidetoggle2(elementid){
	$("#"+elementid).slideToggle(1000);
	//setTimeout("$('#"+elementid+"').remove()",4000);
}
</script>
<style type="text/css">

#settingsdiv{
	border:0px #006 solid;
	width:996px;
	font-size:16px;
}
#settingsdiv td{
	padding:2px 10px;
	vertical-align: middle;
}
#settingsdiv input{
	margin-top:8px;
	padding:2px;
}
</style>